from rest_framework import serializers

from areas.models import Area

class AreasSerializer(serializers.ModelSerializer):
    class Meta:
        model=Area
        fields=('id','name')


class AreasSubSerializer(serializers.ModelSerializer):
    # area_set =  AreasSerializer(many=True)
    subs = AreasSerializer(many=True)
    class Meta:
        model=Area
        fields=('id','name','subs',)